package com.zhenhao.xsq.ui.activity.user.module;

import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.user.UserManagerActivity;
import com.zhenhao.xsq.ui.activity.user.contract.UserManagerContract;
import com.zhenhao.xsq.ui.activity.user.presenter.UserManagerPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author William
 * @Package com.cxwl.xlxgj.ui.activity.patrol
 * @Description: The moduele of PatrolRecordActivity, provide field for PatrolRecordActivity
 * @date 2019/04/17 14:23:19
 */
@Module
public class UserManagerModule {
    private final UserManagerContract.View mView;


    public UserManagerModule(UserManagerContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public UserManagerPresenter provideUserManagerPresenter(HttpAPIWrapper httpAPIWrapper, UserManagerActivity mActivity) {
        return new UserManagerPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public UserManagerActivity provideUserManagerActivity() {
        return (UserManagerActivity) mView;
    }
}